/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.home.logic;

import com.home.dao.TeamDao;
import com.home.mapping.Team;
import java.util.List;

/**
 *
 * @author pnduy
 */
public class TeamLogic {
    public Team findTeamById(Integer id) {
        Team team = new Team();
        team = (Team) new TeamDao().findByPk(Team.class, id);
        return team;
    }
    
    public List<Team> findAllTeam() {
        return new TeamDao().findAll(Team.class);
    }
    
    public List<Team> findTeamsAndAgentsByVenture(Integer ventureId) {
        return new TeamDao().findTeamsAndAgentsByVenture(ventureId);
    }
}
